NetworkingContentsFigures, Tables, and ListingsAbout This BookWhat to Read
Chapter OrganizationConventions Used in This Book
Special FontsTypes of NotesAssembly-Language InformationNumerical FormatsDevelopment EnvironmentDeveloper Products and SupportIntroduction to AppleTalk!About Networking on the MacintoshAppleTalk Networking#Basic AppleTalk Networking Concepts2Addressing and Data Delivery on AppleTalk Networks0Table 1-1 AppleTalk addressing numbers and names.Figure 1-1 Data delivery on AppleTalk networksAppleTalk ConnectivityAppleTalk Phase 2The AppleTalk Protocol Stack$Figure 1-2 AppleTalk protocol stack AppleTalk Filing Protocol (AFP)Zone Information Protocol (ZIP) AppleTalk Session Protocol (ASP)%AppleTalk Data Stream Protocol (ADSP)%AppleTalk Transaction Protocol (ATP) AppleTalk Echo Protocol (AEP)Name-Binding Protocol (NBP))Routing Table Maintenance Protocol (RTMP) Datagram Delivery Protocol (DDP)Link-Access ProtocolsMultivendor ArchitectureMultinode Architecture+How the AppleTalk Protocols Are Implemented<Table 1-2 AppleTalk drivers and the protocols they implementRFigure 1-3 Device drivers and connections files that implement AppleTalk protocolsThe AppleTalk Manager:Figure 1-4 AppleTalk protocols with programming interfacesAppleTalk and the OSI ModelApplication Layer5Figure 1-5 AppleTalk protocol stack and the OSI modelPresentation Layer
Session LayerTransport Layer
Network LayerData-Link and Physical Layers(Deciding Which AppleTalk Protocol to Use9Making Your Application Available Throughout the InternetIdentifying Zones1Using a Session Protocol to Send and Receive DataAppleTalk Data Stream ProtocolAppleTalk Session ProtocolPerforming a Transaction.Sending and Receiving Data as Discrete Packets%Measuring Packet-Delivery Performance+Accessing AppleShare and Other File ServersNReceiving Packets Using a Virtual Node and
Processing Them in a Custom MannerThe LAP Manager .Directly Accessing a Driver for a Network TypeThe AppleTalk Pascal Interface2Executing Routines Synchronously or AsynchronouslyPolling the Result FieldUsing a Completion RoutineAppleTalk UtilitiesAbout the AppleTalk Utilities Using the AppleTalk Utilities;Determining Whether AppleTalk Phase 2 Drivers Are SupportedFGetting Information About the .MPP Driver and the
Network Environment5Getting the Address of Your Node or Your Local Router?Sending Packets to Applications and
Processes on Your Own Node$Selecting a Node in the Server RangeOListing 2-1 Opening the .MPP driver and obtaining a node ID in the server rangeAppleTalk Utilities ReferenceData StructuresMPP Parameter BlockRoutinesOObtaining Information About the .MPP Driver and the Current Network EnvironmentPGetAppleTalkInfo*Enabling Intranode Delivery of DDP PacketsPSetSelfSend<Getting the Addresses of Your Node and Local Internet RouterGetNodeAddressGetBridgeAddressOpening and Closing DriversMPPOpenMPPClose IsMPPOpen IsATPOpenOpenXPP
Summary of AppleTalk UtilitiesName-Binding Protocol (NBP) About NBPKFigure 3-1 The Name-Binding Protocol and the underlying AppleTalk protocolsXFigure 3-2 The NBP names table on each node, collectively forming an NBP names directory Using NBP Registering Your Entity With NBPSetting Up a Names Table EntryIFigure 3-3 The internet socket address and entity name of an application *Figure 3-4 Names table entry record formatRegistering a Names Table Entry/Listing 3-1 Registering an application with NBP#Handling Names Table Entry RequestsPreparing an Entity Name%Figure 3-5 Entity name record format Looking Up a Name6Figure 3-6 Tuple returned by the PLookupName function Table 3-1 NBP wildcardsBListing 3-2 Calling PLookupName to find matches for an entity name/Extracting a Name From a List of Returned NamescListing 3-3 Creating a buffer to hold name matches found, then using NBPExtract to read the matchesConfirming a Name7Listing 3-4 Confirming an existing NBP name and address&Removing an Entry From the Names Table-Listing 3-5 Removing an NBP names table entryCanceling a Request 1Listing 3-6 Canceling a request to look up a name
NBP ReferenceData StructuresAddress Block RecordNames Table Entry RecordEntity Name RecordThe MPP Parameter Block for NBPRoutinesRegistering an Entity NBPSetNTE
PRegisterName"Handling Name and Address RequestsNBPSetEntityPLookupName
NBPExtractPConfirmNamePRemoveNamePKillNBP
Summary of NBPZone Information Protocol (ZIP) About ZIPUFigure 4-1 The Zone Information Protocol (ZIP) and the underlying AppleTalk protocols Using ZIP+Getting the Name of Your Application’s Zone(Listing 4-1 Using the GetMyZone functionDGetting a List of Zone Names for Your Local Network
or Its InternetZListing 4-2 Using GetZoneList to retrieve names of zones throughout the AppleTalk internetUListing 4-3 Extracting a zone name from the list of zone names returned in the buffer
ZIP ReferenceData Structures The XPP Parameter Block for ZIP RoutinesObtaining Zone Information GetMyZone
GetLocalZonesGetZoneList
Summary of ZIP%AppleTalk Data Stream Protocol (ADSP)
About ADSP,Figure 5-1 ADSP and its underlying protocols5Figure 5-2 Steps for creating an ADSP connection end 3Connections, Connection Ends, and Connection States4Figure 5-3 ADSP connection ends and their componentsConnection Listeners9Figure 5-4 Standard tasks for an ADSP connection listenerReliable Delivery of DataUnsolicited ADSP EventsAbout ASDSPThe Authentication ProcessThe Data Encryption Feature
Using ADSPAllocating Memory for ADSP-Creating and Using a Connection Control Block*Opening and Maintaining an ADSP Connection8Listing 5-1 Using ADSP to establish and use a connection(Creating and Using a Connection ListenerAListing 5-2 Using ADSP to establish and use a connection listener,Writing a User Routine for Connection Events!Listing 5-3 An ADSP user routine
Using ASDSP Opening a Secure ConnectionFrom the Initiator’s End From the Recipient End1Sending Encrypted Data Across a Secure ConnectionADSP ReferenceData Structures(The ADSP Connection Control Block RecordThe Address Block RecordThe DSP Parameter BlockThe ASDSP Parameter BlockThe TRSecureParams RecordRoutines/Establishing and Terminating an ADSP ConnectiondspInitdspOptions dspOpensdspOpen
dspNewCID dspClose
dspRemove 8Establishing and Terminating an ADSP Connection Listener
dspCLInit dspCLListen dspCLDenydspCLRemove <Maintaining an ADSP Connection and Using It to Exchange Data
dspStatus dspRead dspWrite dspAttention dspReset
Summary of ADSP$AppleTalk Transaction Protocol (ATP) About ATPFigure 6-1 An ATP transaction+Figure 6-2 ATP and its underlying protocolsThe ATP Packet Format9Figure 6-3 The ATP packet header control information byte+At-Least-Once and Exactly-Once TransactionsThe Buffer Data Structure ATP Flags%Table 6-1 Constants for ATP flag bits
Using ATP#Writing a Requester ATP Application7Listing 6-1 Opening a socket and sending an ATP request Creating a Buffer Data Structure7Specifying the Parameters for the Send Request Function#Writing a Responder ATP Application3Opening and Setting Up a Socket to Receive RequestsResponding to RequestsKListing 6-2 Opening a socket to receive a request and sending response dataCanceling an ATP Function
ATP ReferenceData StructuresThe Buffer Data StructureThe ATP Parameter BlockThe Address Block RecordRoutinesSending an ATP RequestPSendRequest
PNSendRequest!Opening and Closing an ATP SocketPOpenATPSktPCloseATPSkt*Setting Up a Socket to Listen for RequestsPGetRequestResponding to Requests
PSendResponsePAddResponse Canceling Pending ATP Functions PKillSendReqPRelTCBPKillGetReqATPKillAllGetReq PRelRspCB Building a Buffer Data StructureBuildBDS
Summary of ATP Datagram Delivery Protocol (DDP) About DDP"About Sockets and Socket ListenersNFigure 7-1 Two applications running on the same node, each with its own socket/Figure 7-2 Sending and receiving data using DDPAssigning Socket NumbersFigure 7-3 Assigning socketsDDP Client Protocol TypesObtaining Data From the Network Using DDP'Sending and Receiving Data: An OverviewOpening a SocketSending DataReceiving Data#Creating a DDP Write-Data Structure#Figure 7-4 DDP write-data structure"Using Registers and Packet Headers.How the .MPP Driver Calls Your Socket Listener The DDP Packet and Frame Headers6Figure 7-5 The RHA for both long and short DDP headers7Figure 7-6 Data-link frame header and DDP packet headerThe MPW EquatesReading an Incoming PacketUsing Checksums A Sample Socket Listener"Socket Listener Queues and Buffers^Listing 7-1 Declarations for pointers to the sample socket listener’s queues and packet bufferNListing 7-2 Declaration for the sample socket listener’s packet buffer record LListing 7-3 Declaration for the sample socket listener’s queue header recordSetting Up the Socket ListenerFListing 7-4 Setting up the socket listener from the client application Initializing the Socket Listener,Listing 7-5 Initializing the socket listenerProcessing a Packet1Listing 7-6 Receiving and processing a DDP packetTesting for Available PacketsEListing 7-7 Determining if the socket listener has processed a packet%Measuring Packet-Delivery Performance
Summary of DDP AppleTalk Session Protocol (ASP) About ASP+Figure 8-1 ASP and its underlying protocols+Figure 8-2 Differences between ASP and ADSP
ASP ReferenceData StructuresXPP Parameter Block for ASPRoutines Opening and Closing ASP SessionsASPOpenSessionASPCloseSessionASPCloseAllDSending Commands and Writing Data From the Workstation to the ServerASPUserCommand"Figure 8-3 Error reporting in ASP ASPUserWriteQObtaining Information About ASP’s Maximum Capacities and the Status of the ServerASPGetParmsASPGetStatus*Canceling an ASP Request to Open a Session
ASPAbortOS
Summary of ASPAppleTalk Filing Protocol (AFP) About AFP+Figure 9-1 AFP and its underlying protocols
AFP ReferenceData StructuresAFP Command Block RecordXPP Parameter BlockRoutinesTable 9-1 AFP command codes2Table 9-2 Mapping of AFP commands to ASP functionsAFP General Command FormatAFP Login Command FormatAFP Write Command FormatAFP Read Command Format
Summary of AFP"Link-Access Protocol (LAP) ManagerAbout the LAP ManagerdFigure 10-1 LAP Manager connecting the higher-level AppleTalk protocols with the
selected data linkUsing the LAP Manager+Determining if the LAP Manager Is InstalledBListing 10-1 Checking to determine if the LAP Manager is installed1Adding an Entry to the AppleTalk Transition Queue8Listing 10-2 Adding an AppleTalk Transition Queue entry 9Listing 10-3 Removing an AppleTalk Transition Queue entry@How the LAP Manager Calls Your Transition Event
Handler RoutineJTable 10-1 AppleTalk transitions and their constants and routine selectors7Writing a Transition Event Handler Routine Using PascalDListing 10-4 Glue code for a Pascal transition event handler routineOpen Transition Prepare-to-Close Transition Permission-to-Close Transition Cancel-Close Transition $Network-Connection-Change TransitionUListing 10-5 Glue code to handle the network-connection-change transition from PascalEListing 10-6 Using the glue code for the network validation procedureFlagship-Name-Change Transition-Permission-to-Change-Flagship-Name Transition&Cancel-Flagship-Name-Change TransitionCable-Range-Change TransitionCPU-Speed-Change TransitionDeveloper-Defined Transitions&Defining Your Own AppleTalk Transition*The LAP Manager and 802.2 Protocol Packets+Figure 10-2 Ethernet Phase 1 packet formats+Figure 10-3 Ethernet Phase 2 packet formats/Attaching and Detaching 802.2 Protocol HandlersEFigure 10-4 Using the LAP Manager to receive data for 802.2 protocolsGListing 10-7 Calling a LAP Manager 802.2 routine from assembly languageLAP Manager ReferenceData Structures$The AppleTalk Transition Queue EntryRoutines6Adding and Removing AppleTalk Transition Queue Entries LAPAddATQ LAPRmvATQBNotifying Routines When Your Application-Defined Transition OccursATEventATPreFlightEvent/Attaching and Detaching 802.2 Protocol Handlers
L802Attach
L802Detach
Summary of the LAP Manager:Ethernet, Token Ring, and Fiber Distributed Data Interface,About Ethernet, Token Ring, and FDDI SupportRFigure 11-1 Using protocol handlers to read data directly from the Ethernet driver<About Multivendor Network Interface Controller (NIC) Support2Figure 11-2 How AppleTalk uses multivendor supportAbout Multicast Addressing,Using Ethernet, Token Ring, and FDDI DriversUsing the Ethernet DriverOpening the Ethernet DriverBListing 11-1 Finding an Ethernet card and opening the .ENET driver6Using a Write-Data Structure to Transmit Ethernet Data,Figure 11-3 An Ethernet write-data structure0Listing 11-2 Sending a data packet over Ethernet8Using the Default Ethernet Protocol Handler to Read Data>Listing 11-3 Attaching a protocol handler and reading a packetTListing 11-4 Completion routine to process received packet and await the next packet5Using Your Own Ethernet Protocol Handler to Read Data&Changing the Ethernet Hardware AddressUsing the Token Ring Driver Applying Ethernet FunctionsSending and Receiving Data Using the FDDI DriverApplying Ethernet FunctionsSending and Receiving Data(Ethernet, Token Ring, and FDDI ReferenceData StructuresThe Write-Data StructureGThe Parameter Block for Ethernet, Token Ring, and FDDI Driver FunctionsRoutines4Attaching and Detaching an Ethernet Protocol Handler EAttachPH EDetachPH$Writing and Reading Ethernet PacketsEWriteERead ERdCancelGObtaining Information About the Ethernet Driver and Switching Its Mode EGetInfoESetGeneral0Adding and Removing Ethernet Multicast Addresses EAddMulti EDelMulti*
Summary of Ethernet, Token Ring, and FDDIMultinode Architecture
About Multinode Architecture9Figure 12-1 The long DDP packet header used for multinode_Figure 12-2 How a server-client multinode application might send a broadcast NBP
lookup packet
Using Multinode Architecture"Acquiring and Removing Multinodes LListing 12-1 Defining a Pascal function that makes an immediate AddNode call9Handling an AppleTalk Cable-Range-Change Transition Event-Receiving Packets Addressed to Your Multinode1Calling ReadPacket to Read in the Packet Contents;Calling ReadRest to Complete Reading in the Packet Contents!Sending Packets Using a Multinode Preparing a Write-Data Structure4Figure 12-3 The write-data structure for a multinodeUsing a Checksum Multinode Architecture ReferenceData StructuresThe Write-Data StructureThe Address Block RecordThe Multinode Parameter BlockRoutines'Adding and Removing Multinode AddressesAddNode
RemoveNode$Sending Datagrams Through MultinodesNetWrite"